<?php
    include_once("../../service/commentService.php");
    
    $pro_id = $_POST["pro_id"];
    $user = $_POST["user"];
    $content = $_POST["content"];
    
    if(isset($_POST["comment"])){
        $comment_id = $_POST["comment"];    
        $result = createComment($pro_id,$user,$content,$comment_id);
    }else{
        $result = createComment($pro_id,$user,$content,null);    
    }
    echo $result;

?>